import 'package:basic_web_flutter/router/app_routers.dart';
import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';

class RouterAuth extends GetMiddleware {

  @override
  int? priority = 0;


  @override
  RouteSettings? redirect(String? route) {
    //拦截 处理业务
    Future.delayed(Duration(seconds: 1), ()=> Get.snackbar("登录异常", "请重新登录"));
    return RouteSettings(name: AppRouters.Login);
  }
}